<template>
    <div class="page">
        <div class="bgtop">
            <!-- <p>奖励金 </p> -->
        </div>
        <div class="mywallet">
            <img class="group" src="../../../images/Group136@2x.png">
            <div class="money">
                <p>￥{{money}}</p>
            </div>
            <div class="tixianbox" @click="showm">奖励金提现</div>
        </div>

        <!-- <mt-popup position="bottom" class="bottoms" v-model="show">
            <div>
                <div class="hide" @click="hidem">X&nbsp;</div>
                <div class="inp">
                    <span>提现金额:</span> &nbsp;
                    <input type="number" placeholder="请输入提现金额" v-model="userinpmoney">
                </div>
                <div class="wan" @click="pullmoney">提现</div>
            </div>
        </mt-popup> -->
    </div>
</template>


<script>
import { Toast, Cell, MessageBox } from "mint-ui";
import { userWithdrawal, getUserAmt } from "../../../methods/request.js";
export default {
    // 最顶部黑色栏
    data() {
        return {
            money: "",
            show: false,
            userinpmoney: ""
        };
    },
    components: {},
    created() {
        this.$store.commit("increment", "奖励金提现");
        this.route = Object.assign({}, this.$route);
        this.getAmt();
    },
    methods: {
        showm() {
            this.$router.push({
                path: "/Putforward"
            });
        },
        // hidem() {
        //     this.show = false;
        // },
        getAmt() {
            this.$vux.loading.show({
                text: "Loading"
            });
            getUserAmt({})
                .then(response => {
                    this.$vux.loading.hide();
                    if (response.data.result == "0000") {
                        this.money = response.data.amt;
                    }
                })
                .catch(error => {
                    console.log(error);
                    this.$vux.loading.hide();
                });
        },
        // pullmoney() {
        //     if (this.userinpmoney == "") {
        //         Toast({
        //             message: "请填写提现金额",
        //             position: "middle",
        //             duration: 3000
        //         });
        //         return false;
        //     }
        //     this.$vux.loading.show({
        //         text: "Loading"
        //     });
        //     userWithdrawal({ amount: this.userinpmoney })
        //         .then(response => {
        //             this.$vux.loading.hide();
        //             if (response.rspCode == "0000") {
        //                 if (response.data.resCode == "0000") {
        //                     Toast({
        //                         message: "提现成功",
        //                         position: "middle",
        //                         duration: 3000
        //                     });
        //                 } else {
        //                     Toast({
        //                         message: response.data.message,
        //                         position: "middle",
        //                         duration: 3000
        //                     });
        //                 }
        //             } else {
        //                 Toast({
        //                     message: "提现失败",
        //                     position: "middle",
        //                     duration: 3000
        //                 });
        //             }
        //             this.show = false;
        //         })
        //         .catch(error => {
        //             console.log(error);
        //             this.$vux.loading.hide();
        //         });
        // }
    }
};
</script>
<style lang="less" scoped>
@import "~src/components/css/gloState.less";
.page {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: #f1f2f3;
    overflow-x: auto;
    .mywallet {
        width: 90%;
        height: 200px;
        text-align: center;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        background: #ffffff;
        margin: -70px auto;
        border-radius: 15px;
        position: relative;
        .money p {
            font-size: 32px;
            font-weight: bold;
            padding-top: 100px;
            color: #ff3b2f;
        }
    }
    .bottoms {
        width: 100%;
        padding: 0 0 30px 0;
        .inp {
            width: 100%;
            height: 60px;
            display: flex;
            align-items: center;
            margin-left: 3%;
            box-sizing: border-box;
            span {
                padding-left: 10px;
                font-size: 16px;
                color: #333333;
            }
            input {
                width: 65%;
                text-indent: 14px;
                height: 34px;
                border: 1px solid rgb(172, 170, 170);
                border-radius: 8px;
                margin-left: 10px;
            }
        }
        .hide {
            height: 35px;
            line-height: 35px;
            text-align: right;
            font-size: 20px;
            padding-right: 8px;
        }
        .wan {
            margin-left: 5%;
            width: 90%;
            height: 32px;
            line-height: 32px;
            border-radius: 8px;
            font-size: 16px;
            color: #ffffff;
            background-color: #ff3b2f;
            margin-top: 5px;
        }
    }
}
.bgtop {
    width: 100%;
    height: 150px;
    background: url(../../../images/Rectangle309@2x.png) no-repeat;
}
.bgtop p {
    width: 100%;
    text-align: center;
    color: #ffffff;
    font-size: 18px;
    line-height: 48px;
}
.group {
    width: 180px;
    position: absolute;
    top: -50px;
    left: 50%;
    margin-left: -90px;
}
.tixianbox {
    width: 100%;
    text-align: center;
    background: #ff3b2f;
    color: #ffffff;
    position: absolute;
    font-size: 15px;
    left: 0;
    bottom: 0;
    line-height: 50px;
    border-radius: 0 0 15px 15px;
}
</style>
